{% extends 'base.html' %}

{% block title %}
观赛预约
{% endblock %}

{% block content %}
<div class="container mt-5">
    <h2 class="text-center mb-4">观赛预约</h2>
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-body">
                    <form method="POST">
                        {{ form.hidden_tag() }}

                        <div class="mb-3">
                            {{ form.event_id.label(class="form-label") }}
                            {{ form.event_id(class="form-select") }}
                            {% for error in form.event_id.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="mb-3">
                            {{ form.name.label(class="form-label") }}
                            {{ form.name(class="form-control") }}
                            {% for error in form.name.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="mb-3">
                            {{ form.phone.label(class="form-label") }}
                            {{ form.phone(class="form-control") }}
                            {% for error in form.phone.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="mb-3">
                            {{ form.id_type.label(class="form-label") }}
                            {{ form.id_type(class="form-select") }}
                            {% for error in form.id_type.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="mb-3">
                            {{ form.id_number.label(class="form-label") }}
                            {{ form.id_number(class="form-control") }}
                            {% for error in form.id_number.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="mb-3">
                            {{ form.booking_date.label(class="form-label") }}
                            {{ form.booking_date(class="form-control") }}
                            {% for error in form.booking_date.errors %}
                                <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>

                        <div class="text-center">
                            {{ form.submit(class="btn btn-primary btn-lg") }}
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}